package com.example.film.controller;

import com.example.film.entity.ShowFilm;
import com.example.film.service.ShowFilmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "正在热映电影信息管理接口")
@CrossOrigin
@RestController
@RequestMapping("showfilm/v1")
public class ShowFilmController {
    @Autowired
    private ShowFilmService showFilmService;

    @ApiOperation("正在热映电影信息")
    @GetMapping("/show")
    public List<ShowFilm> getShowFilm(){
        return showFilmService.findShowFilm();
    }
}
